﻿#region usings
using System;
using System.Collections.ObjectModel;
using System.ServiceModel.DomainServices.Client;
using InsuranceAdjuster.Web.Models;
using System.Collections.Generic;
using InsuranceAdjuster.OccasionallyConnected;
using InsuranceAdjuster.Web.Services;
#endregion
namespace InsuranceAdjuster.Services {
    public interface IInsuranceAdjusterDataService {
        event EventHandler<HasChangesEventArgs> NotifyHasChanges;
        InsuranceAdjuster.Web.Services.SLInsuranceDomainContext DataContext { get; }

        void SaveAll(Action<SubmitOperation> submitCallback, object state);
        #region Appointments
        void GetAppointments(Action<ObservableCollection<AdjusterAppointment>> getAppointmentsCallback);

        void GetAppointmentByAdjuster(
            Action<ObservableCollection<AdjusterAppointment>> getAppointmentByAdjusterCallback,
            string adjuster_Id);

        void GetAdjusterAppointmentsDeltaInformation(Action<List<KeyValuePair<IEntity, EntitySyncOperation>>> callback);

        //void GetAdjusterAppointmentsByDelta(DateTime clientAnchor,
        //    Action<ObservableCollection<AdjusterAppointment>> callback);

        //void GetDeletedAdjusterAppointments(DateTime clientAnchor,
        //    Action<ObservableCollection<AdjusterAppointment>> callback);
        #endregion
            
        #region Claims
        void GetClaims(Action<ObservableCollection<Claim>> callback);
        void GetClaimById(Action<ObservableCollection<Claim>> callback, Guid claim_Id);

        void SaveClaim(Action<SubmitOperation> callback, object state);

        void GetClaimDeltaInformation(Action<List<KeyValuePair<IEntity, EntitySyncOperation>>> callback);
        #endregion

        #region ClaimDamage
        void GetClaimDamageByClaimId(Action<ObservableCollection<ClaimDamage>> getClaimDamageCallback, Guid claim_Id);
        void GetClaimDamageDeltaInformation(Action<List<KeyValuePair<IEntity, EntitySyncOperation>>> callback);

        #endregion

        #region Vehicles
      
        void GetVehicleImage(Action<ObservableCollection<VehicleReferencePhoto>> callback, int year, string make, string model);
        void GetReferencePhoto(Guid photoGuid, Action<ObservableCollection<VehicleReferencePhoto>> callback);
        #endregion

        #region BranhOffice
        void SaveBranchStyles(Action<Models.BranchStyle> callback, object state);
        #endregion

        #region Lookups
        void GetBranchOffice(Action<ObservableCollection<BranchOffice>> callback);
        void GetBranchStyles(Action<Models.BranchStyle> callback);
        void GetBranchStylesByBranchId(Action<Models.BranchStyle> callback, string branch_Id);
        void GetStandardVehicleImageByBodyType(Action<ObservableCollection<StandardVehicleImage>> callback, string bodyType_Id);
        void GetVehicleBodyType(Action<ObservableCollection<VehicleBodyType>> callback);
        void GetVehicleInformation(Action<ObservableCollection<StandardVehicleImage>> callback);
        void GetVehicleInformationDelta(Action<List<KeyValuePair<IEntity, EntitySyncOperation>>> callback);
        
        void GetClaimStatus(Action<ObservableCollection<ClaimStatu>> callback);
        void GetClaimStatusDeltaInformation(Action<List<KeyValuePair<IEntity, EntitySyncOperation>>> callback);

        void GetStates(Action<ObservableCollection<State>> callback);
        void GetStateDeltaInformation(Action<List<KeyValuePair<IEntity, EntitySyncOperation>>> callback);
        #endregion
    }
}

